-- msg_ship_skills
-- Create by panyl
-- 空战秘宝

return function(lpc)
    local shipSkills = {};

    local buffer = Buffer.create(lpc.ship_skills);
    local offset = 2;
    local size = Buffer.size(buffer);
    while (offset <= size) do
        local amount = Buffer.getu8(buffer, offset);
        if (amount > 0) then
            -- 因为第一个（skillId = 0）是物理攻击，所以这里需要-1
            shipSkills[offset - 1] = amount;
        end

        -- 继续下一个
        offset = offset + 1;
    end

    ME.user.dbase:set("shipSkills", shipSkills);
end
